package firewatig;

class Element {
	JSSH jssh
	Finder finder
	String what
	
	Element(jssh, tag, how, what){
		this.jssh = jssh
		this.finder = new Finder(tag:tag, how:how, what:what)
	}
	
	def set = {		
		def cmd = ""+finder+".value = '$it'"
		jssh.say(cmd)
	}
	
	def click = {			
		def cmd = "clickIt("+finder + ")" 
		jssh.say(cmd)
		jssh.bwait()
	}

}
